<!DOCTYPE html>
<html lang="en">

<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">
<link rel="shortcut icon" href="img/ic.png">
    <title>智能车测评展示系统</title>

    <!-- Bootstrap Core CSS -->
    <link href="css/bootstrap.css" rel="stylesheet">
    <!-- Custom CSS -->
    <!-- Morris Charts CSS -->
    <link href="css/plugins/morris.css" rel="stylesheet">

    <!-- Custom Fonts -->
    <link href="font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
    <link rel="stylesheet" href="css/cdn/dataTables.bootstrap.css">
    <link rel="stylesheet" href="css/cdn/font_i0327076nave7b9.css">
    <link href="nuget/content/content/toastr.css" rel="stylesheet" type="text/css"/>
    <link rel="stylesheet" type="text/css" href="css/datatable.css"/>
    <link rel="stylesheet" type="text/css" href="css/Ranking.css"/>
    <style>
    	#example tbody tr:nth-child(1) td{
    		color: #fff;
    		font-size: 18px;
    		font-weight: bold;
    	}
    	#example tbody tr:nth-child(2) td{
    		color: #fff;
    		font-size: 18px;
    		font-weight: bold;
    	}
    	#example tbody tr:nth-child(3) td{
    		color: #fff;
    		font-size: 18px;
    		font-weight: bold;
    	}
    	#example tbody tr td{
    		color: #fff;
    		font-size: 18px;
    		font-weight: bold;
    	}
    	#example>thead{
    		height: 0px;
    	}
    	.login{
    		float: right;
    		font-weight: 600;
    		padding-right: 65px;
    		font-size: 20px;
    		color: #FFFF00;
    		text-decoration:none;
    	}
    	.login:hover{
    		text-decoration:none;
    		color: #FFFF00;
    	}
		.sorting_disabled{
			height: 46px;
		}
    </style>
</head>

<body>
	<div id="bg">
		<div class="panel-heading">
			<div class="login-logo" style="margin-top: 20px;">
				<img src="img/title_02.png" />
				<a href="Ranking_2.html" class="login"><img src="img/skip.png"></a>
			</div>
		</div>
		<div class="panel-body">
		    <table id="example" class="display" width="100%"></table>
		</div>
	</div>
    <!-- jQuery -->
    <script src="js/jquery.js"></script>
    <!-- Bootstrap Core JavaScript -->
    <script src="js/bootstrap.min.js"></script>
	<!-- tab table-->
    <script src="js/cdn/jquery.dataTables.min.js"></script>
    <script src="js/cdn/dataTables.bootstrap.js"></script>
    <!-- device-->
	<script type="text/javascript" src="js/common.js" ></script>
	<script type="text/javascript" src="js/vue/vue.js" ></script>
	<script type="text/javascript" src="js/vue/vue-router.js" ></script>
	<script>
		Vue.filter("timeChange", function(value) {
			return replaceTime(value / 1000);
		});
		var vue = new Vue({
		  el: '#bg',
		  data:{
		  },
		  mounted:function(){
		  	this.deviceBasicId();
		  },
		  methods:{
		  	//初始化显示详情
		  	deviceBasicId:function(){
		  		if(screen.width > 1366){
		  			var myTable = $('#example').DataTable({
					    "processing": false, //DataTables载入数据时，是否显示‘进度’提示
					    "scrollY": "700px",
			            "stateSave": true, //是否打开客户端状态记录功能,此功能在ajax刷新纪录的时候不会将个性化设定回复为初始化状态
			            "scrollCollapse": true, //是否开启DataTables的高度自适应，当数据条数不够分页数据条数的时候，插件高度是否随数据条数而改变
			            "paginationType": "full_numbers", //详细分页组，可以支持直接跳转到某页
			            "language": lang, //提示信息
			            "autoWidth": true, //自适应宽度，
			            "lengthMenu": [8, 30, 50],
			            "showRowNumber":true,
			            "searching": false, //是否允许Datatables开启本地搜索
			            "paging": false, //是否开启本地分页
			            "lengthChange": false, //是否允许产品改变表格每页显示的记录数
			            "info": false, //控制是否显示表格左下角的信息
			            //跟数组下标一样，第一列从0开始，这里表格初始化时，第四列默认降序
			            "ordering": false,
			            "deferRender": true, //延迟渲染
			            //"ajax":"json/device.json",
					    "ajax": {
					      	url : url +'/users/'+adminId+'/teams',
							type : 'get',
							dataType : 'json',
							data:{
								"currentPage":1,
								"pageSize":9999,
							},
							success : function(data) {
								if(data['code'] == 1){
			                        if(data.result.length != 0)
			                            $('#example').dataTable().fnAddData(data.result);
			                        else
			                            $('#example').dataTable().fnClearTable();
			                    }else{
									ifajax(data);
								}
							}
					      }, 
	
				      "columns": [{
				      		"data":"teamLotNo",
				      		"sTitle":"车队编号",
				      		"width":"120px",
				      		"sDefaultContent":"",
				      	},{
			                "data":function(obj){
			                	var time = getNowDate();
				        		return '<a href="Exhibition.html?teamId=' + obj.teamId + '&date='+time+'" target="_blank" style="color:#04f6ff; text-decoration:none;"><b>' + obj.teamName + '</b></a>';
			                },
			                "sTitle":"车队",
			                "sDefaultContent": "",
			            },{
			                "data": "teamOrganization",
			                "sTitle": "参赛单位",
			                "sDefaultContent": "",
			            },{
			                "data": "teamLeader",
			                "sTitle": "联系人",
			                "sDefaultContent": "",
			            }],
				    });
		  		}else{
		  			var myTable = $('#example').DataTable({
					    "processing": false, //DataTables载入数据时，是否显示‘进度’提示
					    "scrollY": "400px",
			            "stateSave": true, //是否打开客户端状态记录功能,此功能在ajax刷新纪录的时候不会将个性化设定回复为初始化状态
			            "scrollCollapse": true, //是否开启DataTables的高度自适应，当数据条数不够分页数据条数的时候，插件高度是否随数据条数而改变
			            "paginationType": "full_numbers", //详细分页组，可以支持直接跳转到某页
			            "language": lang, //提示信息
			            "autoWidth": true, //自适应宽度，
			            "lengthMenu": [8, 30, 50],
			            "showRowNumber":true,
			            "searching": false, //是否允许Datatables开启本地搜索
			            "paging": false, //是否开启本地分页
			            "lengthChange": false, //是否允许产品改变表格每页显示的记录数
			            "info": false, //控制是否显示表格左下角的信息
			            //跟数组下标一样，第一列从0开始，这里表格初始化时，第四列默认降序
			            "ordering": false,
			            "deferRender": true, //延迟渲染
			            //"ajax":"json/device.json",
					    "ajax": {
					      	url : url +'/users/'+adminId+'/teams',
							type : 'get',
							dataType : 'json',
							data:{
								"currentPage":1,
								"pageSize":9999,
							},
							success : function(data) {
								if(data['code'] == 1){
			                        if(data.result.length != 0)
			                            $('#example').dataTable().fnAddData(data.result);
			                        else
			                            $('#example').dataTable().fnClearTable();
			                    }else{
									ifajax(data);
								}
							}
					      }, 
	
				      "columns": [{
				      		"data":"teamLotNo",
				      		"sTitle":"车队编号",
				      		"width":"120px",
				      		"sDefaultContent":"",
				      	},{
			                "data":function(obj){
			                	var time = getNowDate();
				        		return '<a href="Exhibition.html?teamId=' + obj.teamId + '&date='+time+'" target="_blank" style="color:#04f6ff; text-decoration:none;"><b>' + obj.teamName + '</b></a>';
			                },
			                "sTitle":"车队",
			                "sDefaultContent": "",
			            },{
			                "data": "teamOrganization",
			                "sTitle": "参赛单位",
			                "sDefaultContent": "",
			            },{
			                "data": "teamLeader",
			                "sTitle": "联系人",
			                "sDefaultContent": "",
			            }],
				    });
		  		}
				
		  	},
		  	
		  },
		});

	</script>
</body>

</html>
